﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WenSkin.Controls;

namespace WenSkinTest
{
    public partial class UserControl1 : WenUserControl
    {
        public UserControl1()
        {
            InitializeComponent();
        }

        private void WenButton1_Click(object sender, EventArgs e)
        {
            ButtonCilck?.Invoke(this, new ButtonClickEventArgs("test"));
        }

        public event ButtonClickEventHandler ButtonCilck;
        public event ButtonClickEventHandler RemoveCilck;

        public delegate void ButtonClickEventHandler(object sender, ButtonClickEventArgs e);
        public class ButtonClickEventArgs : EventArgs
        {
            public ButtonClickEventArgs(string text)
            {
                this.Text = text;
            }

            public object Data { get; set; }
            public string Text { get; private set; }
        }

        private void WenButton2_Click(object sender, EventArgs e)
        {
            RemoveCilck?.Invoke(this, new ButtonClickEventArgs("test"));
        }
    }
}
